<template>
    <view style="height: 100%">
        <!-- pages/detail/detail.wxml -->
        <view>
            <text class="title">招聘</text>
        </view>
        <view class="all">
            <view class="info">
                <view class="onerow">
                    <text class="name_com">公司名称：</text>
                    <text>{{ postList.com_name }}</text>
                </view>
                <view class="onerow">
                    <text class="name_com">职位：</text>
                    <text>{{ postList.job }}</text>
                </view>
                <view class="onerow">
                    <text class="name_com">薪水：</text>
                    <text>{{ postList.salaryofmouth }}</text>
                </view>
                <view class="onerow">
                    <text class="name_com">工作时间：</text>
                    <text>{{ postList.work_time }}h/day</text>
                </view>
                <view class="morerow">
                    <text class="name_com">公司介绍:</text>
                    <view class="mrinfo" style="text-indent: 2em">{{ postList.com_intro }}</view>
                </view>
                <view class="onerow">
                    <text class="name_com">公司地址:</text>
                    <text>{{ postList.com_loca }}</text>
                </view>
                <view class="morerow">
                    <text class="name_com">职位介绍:</text>
                    <view class="mrinfo" style="text-indent: 2em">{{ postList.job_intro }}</view>
                </view>
                <view class="onerow">
                    <text class="name_com">职位要求:</text>
                    <text>{{ postList.job_req }}</text>
                </view>
                <view class="aimage">
                    <image class="image1" :src="postList.photo"></image>
                </view>
                <view class="onerow">
                    <text class="name_com">联系人:</text>
                    <text>{{ postList.linkman }}</text>
                </view>
                <view class="onerow">
                    <text class="name_com">联系方式:</text>
                    <text>{{ postList.contact_way }}</text>
                </view>
                <view class="morerow">
                    <text class="name_com">评论:</text>
                    <view class="mrinfo" style="text-indent: 2em">{{ postList.commit }}</view>
                </view>
                <view class="onerow">
                    <view class="onerow">
                        <image src="/static/photo/分享.png" alt="" style="width: 50rpx; height: 50rpx"></image>
                        <text>分享</text>
                    </view>
                    <view class="onerow">
                        <image src="/static/photo/收藏.png" alt="" style="width: 50rpx; height: 50rpx"></image>
                        <text>收藏</text>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
// pages/detail/detail.js
import { postList } from '../../data/data';
export default {
    data() {
        return {
            postList: {
                com_name: '',
                job: '',
                salaryofmouth: '',
                work_time: '',
                com_intro: '',
                com_loca: '',
                job_intro: '',
                job_req: '',
                photo: '',
                linkman: '',
                contact_way: '',
                commit: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        this.setData({
            postList: postList
        });
        console.log(postList.com_name);
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {}
};
</script>
<style>
/* pages/detail/detail.wxss */
.title {
    font-size: 32rpx;
    margin-left: 32rpx;
    margin-top: 20rpx;
    margin-bottom: 4rpx;
    font-weight: 600;
}
.name_com {
    font-size: 32rpx;
    margin-left: 20rpx;
    font-weight: 1000;
}
.aimage {
    display: flex;
    justify-content: center;
    align-items: center; /*垂直居中*/
    margin-left: 25rpx;
    margin-top: 20rpx;
    margin-bottom: 20rpx;
}
.image1 {
    width: 655rpx;
    height: 350rpx;
}

.link {
    font-size: 28rpx;
    margin-left: 20rpx;
    margin-top: 20rpx;
    margin-bottom: 20rpx;
    font-weight: 600;
}
.onerow {
    display: flex;
    flex-direction: row;
    margin-right: 20rpx;
}

.mrinfo {
    margin-left: 20rpx;
    margin-right: 20rpx;
}
.info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* 上下边线 */
    border-top: 2rpx solid #b8b5b5;
    border-bottom: 2rpx solid #b8b5b5;
    padding-top: 10rpx;
    padding-bottom: 10rpx;
    width: 700rpx;
    height: auto;
    margin-top: 20rpx;
    margin: 20rpx, 10rpx, 20rpx, 10rpx;
    justify-content: flex-start;
}
</style>
